import java.util.Scanner;

/**
 * @author yuanbinbing
 * 求m到n的之间的偶数和
 */
public class Task15_02 {
    public static void main(String[] args) {
        System.out.println("请输入两个整数：");
        Scanner sc = new Scanner(System.in);
        int m = sc.nextInt();
        int n = sc.nextInt();

        int result=getEvenSum(m,n);
        System.out.println(m+"到"+n+"的之间的偶数和为："+result);
    }
    public static int getEvenSum(int m,int n) {
        int sum=0;
        for(int i=m;i<=n;i++){
            if(i%2==0){
                sum=sum+i;
            }
        }
      return sum;
    }
}
